<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>slibc: slibc/stdio.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">slibc
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_4d4a740b65ecc1faa3510c186d2f00c5.html">slibc</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">stdio.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="stdio_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright (C) 2011-2012 SBA Research gGmbh</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">   This file is part of the Slibc Library.</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">   The Slibc Library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment">   modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment">   License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment">   version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">   The Slibc library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">   but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment">   Lesser General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">   You should have received a copy of the GNU Lesser General Public</span>
<a name="l00016"></a>00016 <span class="comment">   License along with the Slibc Library; if not, see</span>
<a name="l00017"></a>00017 <span class="comment">   &lt;http://www.gnu.org/licenses/&gt;.  </span>
<a name="l00018"></a>00018 <span class="comment">*/</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include_next &lt;stdio.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef SLIBC_STDIO_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define SLIBC_STDIO_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="comment">// TR 24731-1 is not available if __STDC_WANT_LIB_EXT1__ equals 0</span>
<a name="l00029"></a>00029 <span class="preprocessor">#if (!defined(__STDC_WANT_LIB_EXT1__) || (__STDC_WANT_LIB_EXT1__ != 0))</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="comment">// normally stdlib.h includes stdarg.h but it depends</span>
<a name="l00032"></a>00032 <span class="comment">// on compilaton flags. since we use the standard va_list</span>
<a name="l00033"></a>00033 <span class="comment">// we include it.</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;stdarg.h&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;./base_.h&quot;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="stddef_8h.html" title="TR 24731-1 stddef.h defines the type rsize_t.">./stddef.h</a>&quot;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="errno_8h.html" title="TR 24731-1 errno.h defines the type errno_t.">./errno.h</a>&quot;</span>
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 SLIBC_BEGIN_DECLS
<a name="l00040"></a>00040 
<a name="l00042"></a>00042 <span class="preprocessor">#if ((L_tmpnam) &gt; 25)</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor"># define L_tmpnam_s L_tmpnam</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00045"></a><a class="code" href="stdio_8h.html#a09b140e9e420babafa898f896b581253">00045</a> <span class="preprocessor"></span><span class="preprocessor"># define L_tmpnam_s 25</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00049"></a><a class="code" href="stdio_8h.html#addf5a05115c692407cb6a1ade786b15f">00049</a> <span class="preprocessor">#define TMP_MAX_S TMP_MAX</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>        
<a name="l00051"></a>00051 
<a name="l00076"></a>00076 
<a name="l00077"></a>00077 errno_t <a class="code" href="stdio_8h.html#adcbc1f57d37cab64e838716b540923de" title="This function creates a temporary file.">tmpfile_s</a>(FILE * restrict * restrict streamptr);
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 
<a name="l00114"></a>00114 
<a name="l00115"></a>00115 errno_t <a class="code" href="stdio_8h.html#a1347d74811c07751994e4a60f04e269e" title="This function creates a file or directory name that is unique for the specified temporary directory...">tmpnam_s</a>(<span class="keywordtype">char</span> *s, rsize_t maxsize);
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 
<a name="l00136"></a>00136 
<a name="l00137"></a>00137 <span class="keywordtype">char</span> *<a class="code" href="stdio_8h.html#a9e54d89fa5bc63cee86ac0c77b553e10" title="The gets_s function reads one line from stdin into s.">gets_s</a>(<span class="keywordtype">char</span> *s, rsize_t n);
<a name="l00138"></a>00138 
<a name="l00139"></a>00139 
<a name="l00159"></a>00159 
<a name="l00160"></a>00160 errno_t <a class="code" href="stdio_8h.html#a41bdd93b9ffe818b15ca8959c2dc70c5" title="The fopen_s function opens the file specified by filename.">fopen_s</a>(FILE * restrict * restrict streamptr,
<a name="l00161"></a>00161                                  <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict filename,
<a name="l00162"></a>00162                                  <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict mode);
<a name="l00163"></a>00163 
<a name="l00164"></a>00164 
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 errno_t <a class="code" href="stdio_8h.html#ad84103bce0da3347584f724a03d97868" title="The freopen_s function opens filename and closes stream.">freopen_s</a>(FILE * restrict * restrict newstreamptr,
<a name="l00186"></a>00186                   <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict filename,
<a name="l00187"></a>00187                   <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict mode,
<a name="l00188"></a>00188                   FILE * restrict stream);
<a name="l00189"></a>00189 
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 
<a name="l00214"></a>00214 
<a name="l00215"></a>00215 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#ab23abdde72205874b2fb1dbd62d3f420" title="This function allows fomatted output into buffer s while taking into account its size.">sprintf_s</a>(<span class="keywordtype">char</span> * restrict s, 
<a name="l00216"></a>00216                           rsize_t n,
<a name="l00217"></a>00217                           <span class="keyword">const</span> <span class="keywordtype">char</span> * restrict format, ...) 
<a name="l00218"></a>00218         __attribute__ ((format (printf, 3, 4)));
<a name="l00219"></a>00219 
<a name="l00220"></a>00220 
<a name="l00248"></a>00248 
<a name="l00249"></a>00249 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a4772e3cf6be186e274cfb571ecc2a12e" title="This function allows fomatted output into buffer s while taking into account its size.">snprintf_s</a>(<span class="keywordtype">char</span> * restrict s, 
<a name="l00250"></a>00250                            rsize_t n,
<a name="l00251"></a>00251                            const <span class="keywordtype">char</span> * restrict format, ...) 
<a name="l00252"></a>00252         __attribute__ ((format (printf, 3, 4)));
<a name="l00253"></a>00253 
<a name="l00254"></a>00254 
<a name="l00271"></a>00271 
<a name="l00272"></a>00272 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a3ff3ddc4dfd8d6853dda4441b8fdf2bc" title="The vsprintf_s function is equivalent to sprintf_s but expects a va_list argument.">vsprintf_s</a>(<span class="keywordtype">char</span> * restrict s, 
<a name="l00273"></a>00273                            rsize_t n,
<a name="l00274"></a>00274                            const <span class="keywordtype">char</span> * restrict format,
<a name="l00275"></a>00275                            va_list arg) 
<a name="l00276"></a>00276         __attribute__ ((format (printf, 3, 0)));
<a name="l00277"></a>00277 
<a name="l00278"></a>00278 
<a name="l00297"></a>00297 
<a name="l00298"></a>00298 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#acebd989cc77ba725898eeab88bb5c83e" title="The vsnprintf_s function is equivalent to snprintf_s but expects a va_list argument.">vsnprintf_s</a>(<span class="keywordtype">char</span> * restrict s, 
<a name="l00299"></a>00299                                 rsize_t n,
<a name="l00300"></a>00300                                 const <span class="keywordtype">char</span> * restrict format,
<a name="l00301"></a>00301                                 va_list arg)
<a name="l00302"></a>00302         __attribute__ ((format (printf, 3, 0)));
<a name="l00303"></a>00303         
<a name="l00304"></a>00304 
<a name="l00319"></a>00319 
<a name="l00320"></a>00320 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a782409a2522ee4d043b3f9fb0e569bf2" title="The fprintf_s function is analogous to the fprintf function except that the n specifier is not allowe...">fprintf_s</a>(FILE * restrict stream,
<a name="l00321"></a>00321                const <span class="keywordtype">char</span> * restrict format, ...);
<a name="l00322"></a>00322 
<a name="l00323"></a>00323 
<a name="l00337"></a>00337 
<a name="l00338"></a>00338 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a39e46d0a0dd7ecdfa3f9874e1474c14c" title="The vfprintf_s function is equivalent to fprintf_s but expects a va_list argument.">vfprintf_s</a>(FILE * restrict stream,
<a name="l00339"></a>00339                const <span class="keywordtype">char</span> * restrict format, va_list arg);
<a name="l00340"></a>00340         
<a name="l00341"></a>00341         
<a name="l00354"></a>00354 
<a name="l00355"></a>00355 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#ac120f05917e7c4cae5bedb7ac6981afc" title="The printf_s function behaves as fprintf_s when fprintf_s is called with an argument of stdout...">printf_s</a>(const <span class="keywordtype">char</span> * restrict format, ...);
<a name="l00356"></a>00356         
<a name="l00357"></a>00357 
<a name="l00358"></a>00358 
<a name="l00371"></a>00371 
<a name="l00372"></a>00372 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#acc1c00849d93d30b42796c197df348db" title="The vprintf_s function is equivalent to printf_s but expects a va_list argument.">vprintf_s</a>(const <span class="keywordtype">char</span> * restrict format,
<a name="l00373"></a>00373               va_list arg);
<a name="l00374"></a>00374 
<a name="l00375"></a>00375                   
<a name="l00388"></a>00388 
<a name="l00389"></a>00389 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a7ea4b57616b78815bbeee9de4ee262d3" title="The scanf_s function behaves as fscanf_s when fscanf_s is called with an argument of stdin...">scanf_s</a>(const <span class="keywordtype">char</span> * restrict format, ...);
<a name="l00390"></a>00390 
<a name="l00391"></a>00391 
<a name="l00404"></a>00404 
<a name="l00405"></a>00405 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a8f6ee427a1997b78587adf4d41f6b465" title="The vscanf_s function is equivalent to scanf_s but expects a va_list argument.">vscanf_s</a>(const <span class="keywordtype">char</span> * restrict format, va_list arg);
<a name="l00406"></a>00406 
<a name="l00407"></a>00407 
<a name="l00421"></a>00421 
<a name="l00422"></a>00422 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a40944d5f28ff6a57486294570684ddb4" title="The vsscanf_s function is equivalent to sscanf_s but expects a va_list argument.">vsscanf_s</a>(const <span class="keywordtype">char</span> * restrict s,
<a name="l00423"></a>00423                           const <span class="keywordtype">char</span> * restrict format, va_list arg);
<a name="l00424"></a>00424 
<a name="l00425"></a>00425 
<a name="l00438"></a>00438 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a1f76ade9689eae85abac54091fef3e4d" title="The sscanf_s function is analogous to fscanf_s but reads from a string instead of a stream...">sscanf_s</a>(const <span class="keywordtype">char</span> * restrict s,
<a name="l00439"></a>00439               const <span class="keywordtype">char</span> * restrict format, ...);
<a name="l00440"></a>00440                   
<a name="l00441"></a>00441 
<a name="l00461"></a>00461 
<a name="l00462"></a>00462 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a011f02b262d1d8023c27dfc9f698ab8a" title="A secure variant of fscanf that expects the caller to specify the size for each buffer argument...">fscanf_s</a>(FILE * restrict stream,
<a name="l00463"></a>00463                 const <span class="keywordtype">char</span> * restrict format, ...);
<a name="l00464"></a>00464                         
<a name="l00465"></a>00465                         
<a name="l00479"></a>00479 
<a name="l00480"></a>00480 <span class="keywordtype">int</span> <a class="code" href="stdio_8h.html#a85f7e2ef7805daf256257d5a9cad2932" title="vfscanf_s is equivalent to fscanf_s but expects a va_list argument.">vfscanf_s</a>(FILE * restrict stream,
<a name="l00481"></a>00481                 const <span class="keywordtype">char</span> * restrict format, va_list arg);
<a name="l00482"></a>00482 
<a name="l00483"></a>00483 SLIBC_END_DECLS
<a name="l00484"></a>00484 
<a name="l00485"></a>00485 <span class="preprocessor">#if defined(__cplusplus) &amp;&amp; (defined(SLIBC_WANT_TEMPLATES))</span>
<a name="l00486"></a>00486 <span class="preprocessor"></span><span class="preprocessor"># include &quot;<a class="code" href="stdio__templates___8hpp.html" title="Contains overloaded templates for some _s-functions defined in stdio.h.">./stdio_templates_.hpp</a>&quot;</span>
<a name="l00487"></a>00487 <span class="preprocessor">#endif</span>
<a name="l00488"></a>00488 <span class="preprocessor"></span>
<a name="l00489"></a>00489 <span class="preprocessor">#if (defined(SLIBC_WANT_MKTEMP))</span>
<a name="l00490"></a>00490 <span class="preprocessor"></span><span class="preprocessor"># include &quot;./stdio_ext_.h&quot;</span>
<a name="l00491"></a>00491 <span class="preprocessor">#endif</span>
<a name="l00492"></a>00492 <span class="preprocessor"></span>
<a name="l00493"></a>00493 <span class="preprocessor">#endif //(!defined(__STDC_WANT_LIB_EXT1__) || (__STDC_WANT_LIB_EXT1__ != 0))</span>
<a name="l00494"></a>00494 <span class="preprocessor"></span>
<a name="l00495"></a>00495 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 31 2012 13:48:20 for slibc by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
